﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using prototype123.models;

namespace prototype123.controllers
{

    // SystemController is used to keep track of <currEducator> and <currStudent>
    // Different levels of the program have access to this class.
    // The UI layer typically changes the fields. Though anyone can access them.
    // This is a singleton class
    public class SystemController
    {
        private static SystemController instance;

        private Educator currEducator;
        private Student currStudent;

        private SystemController()
        {
            currEducator = new Educator();
            currStudent = new Student();

        }


        public static SystemController Instance
        {
            get
            {
                if (instance == null)
                {

                    instance = new SystemController();
                }
                return instance;
            }

        }

        
        public Educator CurrentEducator
        {
            get { return currEducator; }
            set { currEducator = value; }
        }

        public Student CurrentStudent
        {
            get { return currStudent; }
            set { currStudent = value; }
        }
    }
}
